from __future__ import unicode_literals

from django.db import models


# Create your models here.
class Common(models.Model):
    username = models.CharField(max_length=20)
    password = models.CharField(max_length=30)

    def __unicode__(self):
        return self.username


class Conser(models.Model):
    sup_name = models.CharField(max_length=20)
    sup_pass = models.CharField(max_length=30)

    def __unicode__(self):
        return self.sup_name


class Feedback(models.Model):
    user_id = models.ForeignKey(Common,on_delete=models.CASCADE)
    content = models.TextField(max_length=200)
    submit_time = models.DateTimeField()
    reply = models.CharField(max_length=150)
    reply_time = models.DateTimeField(blank=True,null=True)
    statues = models.TextField(max_length=10)
    replyer = models.CharField(max_length=20)

    def __unicode__(self):
        return self.content
